﻿@model List<AweStoreMVC.Models.Store>

@{
    ViewBag.Title = "Index";
}
@if(ViewBag.Populate != null)
{
    <p>@Html.ActionLink( "Populate", "Seed", "Home" ).</p>
}
<h2>Index</h2>

<ul>
@foreach ( var store in Model ) {
    <li>@store.Name</li>
    <ul>
        <li>Products:</li>
        <ul>
            @foreach ( var product in store.Products ) {
                <li>@product.Name</li>
            }
        </ul>
        <li>Staff:</li>
        <ul>
            @foreach ( var employee in store.Staff ) {
                <li>@employee.FirstName @employee.LastName</li>
            }
        </ul>
    </ul>
}
</ul>